package org.turl.wrappers;

import org.turl.objects.Angle;

/**
 * Created by tonyx
 * Date: Dec 30, 2007
 * Time: 9:57:46 AM
 */
public class RectangularToPolar implements Wrapper {
        public Object[] wrap(Object[] object) {
            return new Object[] {Math.sqrt((Math.pow((Double) object[0],2.0))+Math.pow((Double) object[1],2.0)),new Angle(Math.atan2((Double) object[1], (Double) object[0]))};
    }
}
